package com.yss.sofa.report.engine.cell.page.header;

import com.yss.sofa.report.engine.Const;
import com.yss.sofa.report.engine.cell.ReportCell;

public class ColCell extends HeaderCell{
	private static final long serialVersionUID = 7776678524133844524L;
	private int width;
	private boolean colVisible;
	protected void init() {
		super.init();
		this.type=Const.REPORT_CELL_TYPE_COL_HEADER;
		this.colVisible=true;
	}
	public void assignTo(ReportCell cell){
		ColCell _=(ColCell)cell;
		super.assignTo(_);
		_.width=this.width;
		_.colVisible=this.colVisible;
	}
	public ColCell create(){
		ColCell _=new ColCell();
		this.assignTo(_);
		return _;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int toPixel(){
		return width/32;
	}
	public boolean isColVisible() {
		return colVisible;
	}
	public void setColVisible(boolean colVisible) {
		this.colVisible = colVisible;
	}
}
